﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using VQWEB.common;
using VQData;
using System.Reflection;

namespace VQWEB.administrator.sources
{
    public class HuongNghiepData
    {
        public static IList<object> ViewTruong() {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_truong>(
                null,
                null,
                null,
                null,
                t => new
                {
                    id = t.truong_id,
                    ma = t.truong_ma,
                    ten = t.truong_ten,
                    logo = t.truong_logo,
                    gioithieu = t.truong_gioithieu,
                    diachi = t.truong_diachi,
                    website = t.truong_website,
                    dienthoai = t.truong_dienthoai,
                    bosung0 = t.truong_bosung_0,
                    bosung1 = t.truong_bosung_1,
                    bosung2 = t.truong_bosung_2,
                    bosung3 = t.truong_bosung_3,
                    bosung4 = t.truong_bosung_4,
                    bosung5 = t.truong_bosung_5,
                    bosung6 = t.truong_bosung_6,
                    bosung7 = t.truong_bosung_7,
                    bosung8 = t.truong_bosung_8,
                    bosung9 = t.truong_bosung_9,
                    bosung10 = t.truong_bosung_10,
                    bosung11 = t.truong_bosung_11,
                    bosung12 = t.truong_bosung_12,
                    bosung13 = t.truong_bosung_13,
                    bosung14 = t.truong_bosung_14,
                    bosung15 = t.truong_bosung_15,
                    bosung16 = t.truong_bosung_16,
                    bosung17 = t.truong_bosung_17,
                    bosung18 = t.truong_bosung_18,
                    bosung19 = t.truong_bosung_19,
                    bosung20 = t.truong_bosung_20,
                    bosung21 = t.truong_bosung_21,
                    bosung22 = t.truong_bosung_22,
                    bosung23 = t.truong_bosung_23,
                    bosung24 = t.truong_bosung_24,
                    bosung25 = t.truong_bosung_25,
                    bosung26 = t.truong_bosung_26,
                    bosung27 = t.truong_bosung_27,
                    bosung28 = t.truong_bosung_28,
                    bosung29 = t.truong_bosung_29,
                    bosung30 = t.truong_bosung_30,
                    hit = t.truong_hit,
                    ishome = t.truong_ishome,
                    active = t.truong_active
                });
            return list;
        }
        public static IList<object> ViewChuyennganh()
        {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_chuyennganh>(
                null,
                null,
                null,
                n => n.chuyennganh_ten,
                n => new
                {
                    id = n.chuyennganh_id,
                    nganh_id=n.nganh_id,
                    ma = n.chuyennganh_ma,
                    ten = n.chuyennganh_ten,
                    gioithieu = n.chuyennganh_gioithieu,
                    active = n.chuyennganh_active

                });
            return list;
        }
        public static IList<object> ViewNganh() {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_nganh>(
                null,
                null,
                null,
                n => n.nganh_ten,
                n => new
                {
                    id = n.nganh_id,
                    nhomnganh_id = n.nhomnganh_id,
                    ma = n.nganh_ma,
                    ten = n.nganh_ten,
                    gioithieu = n.nganh_gioithieu,
                    active = n.nganh_active,

                });
            return list;
        }
        public static IList<object> ViewNhomnganh()
        {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_nhomnganh>(
                null,
                null,
                null,
               nn => nn.nhomnganh_ten,
               nn => new
               {
                   id = nn.nhomnganh_id,
                   ma = nn.nhomnganh_ma,
                   ten = nn.nhomnganh_ten,
                   gioithieu = nn.nhomnganh_gioithieu,
                   active = nn.nhomnganh_active
               });
            return list;
        }
        public static IList<object> ViewHedaotao()
        {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_hedaotao>(
                null,
                null,
                null,
               nn => nn.hedaotao_ten,
               nn => new
               {
                   id = nn.hedaotao_id,
                   ten = nn.hedaotao_ten,
                   active = nn.hedaotao_active
               });
            return list;
        }
        public static IList<object> ViewKhoi()
        {
            BusinessLayer<HuongNghiepModelDataContext> bussiness = new BusinessLayer<HuongNghiepModelDataContext>();
            IList<object> list = bussiness.List<hn_khoi>(
                null,
                null,
                null,
               k => k.khoi_ten,
               k => new
               {
                   id = k.khoi_id,
                   ten = k.khoi_ten,
                   active = k.khoi_active
               });
            return list;
        }

       
    }
}